<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="database.DAO"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>길드가입 결과</title>
</head>
<body>
<%
	DAO dao = DAO.getInstance();
	int serverNo = (Integer)session.getAttribute("serverNo");
	int charNo = (Integer)session.getAttribute("charNo");
	int guildNo;
	if( request.getParameter("guildNo") == null ){
		out.println("가입할 길드를 선택하지 않으셨습니다.");
	}
	else{
		guildNo = Integer.parseInt(request.getParameter("guildNo"));
		String result = dao.joinGuild(guildNo, serverNo, charNo); 
		out.println( result );
		if( result.compareTo("길드가입 신청이 완료 되었습니다.") == 0 ){
			session.setAttribute("guildNo", guildNo);
		}
	}
%>
</body>
</html>